/*
 * @author: yejiang1015
 * @Date: 2019-06-22 15:50:31
 * @Last Modified by: yejiang1015
 * @Last Modified time: 2019-06-29 22:45:26
 * @path 虽然是嵌套但是要全路径书写 @eg：\main\**\**
 */
import React from 'react';
const {lazy} = React;

export default [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: lazy(() => import('pages/Home')),
    },
    {
        path: '/login',
        component: lazy(() => import('pages/User/login')),
    },
    {
        path: '/main',
        component: lazy(() => import('pages/Main')),
        children: [
            {
                path: '/main/',
                redirect: '/main/dashboard'
            },
            {
                path: '/main/dashboard',
                component: lazy(() => import('pages/Main/Dashboard'))
            },
            {
                path: '/main/setting',
                component: lazy(() => import('pages/Main/Setting')),
                children: [
                    {
                        path: '/main/setting/',
                        redirect: '/main/setting/login'
                    },
                    {
                        path: '/main/setting/login',
                        component: lazy(() => import('pages/Main/Setting/User/login'))
                    },
                    {
                        path: '/main/setting/registry',
                        component: lazy(() => import('pages/Main/Setting/User/registry'))
                    }
                ]
            }
        ]
    },
    {
        path: '*',
        redirect: '/'
    }
];
